package com.zsw.dao;

import com.zsw.entity.Account;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;


/**
 * @author zhangsw
 */
public interface AccountDao {
    /**
     * 更新账户信息
     * @param account
     * @return
     */
    @Update("update account set balance=#{balance} where id=#{id}")
    Integer updateAccount(Account account);

    /**
     * 根据用户编号查询用户账户信息
     * @param id
     * @return
     */
    @Select("select id,name,balance from account where id=#{id}")
    Account getAccountByUserId(Integer id);
}
